<template>
  <div id="app">
 <router-view/>

  </div>
</template>
<script src="./JavaScript/jquery-2.1.1.min.js"></script>
<script>
import mainMap from "./components/HzMap";
import eachMap from "./components/EachMap";
import mapEventManager from "./JavaScript/MapEventManager";
import Bus from "./components/Bus";
import Global from './components/Global'
export default {
  name: "App",
  components: {
    eachMap,
    mainMap
  },
  data() {
    return {
      towMapId: "towMap",
      treeMapId: "treeMap",
      fourMapId: "fourMap",
      mainMapWidth: "100%",
      mainMapHeight: "100%",
      towMapDivWidth: "0px",
      towMapDivHeight: "0px",
      treeMapDivWidth: "0px",
      treeMapDivHeight: "0px",
      fourMapDivWidth: "0px",
      fourMapDivHeight: "0px",
      isEachMap: false
    };
  },
  mounted: function() {

/*     Global.addconfig().then(function(data){
  Global.addressUrl=data.addressUrl;
  Global.layerTypeTreeUrl = data.layerTypeTreeUrl;
  Global.attachUrl=data.attachUrl;
  Global.historyLayer=data.historyLayer;
  Global.layerData=data.layerData;
}) */
    function checkIE() {
      return (
        "-ms-scroll-limit" in document.documentElement.style &&
        "-ms-ime-align" in document.documentElement.style
      );
    }
    if (checkIE()) {
      window.addEventListener(
        "hashchange",
        () => {
          var currentPath = window.location.hash.slice(1);
          if (this.$route.path !== currentPath) {
            this.$router.push(currentPath);
          }
        },
        false
      );
    }
  },
  created() {
  },
  methods: {
    closeEachMap: function() {
      var self = this;
      self.mainMapHeight = "100%";
      self.mainMapWidth = "100%";
      self.towMapDivHeight = "0px";
      self.towMapDivWidth = "0px";
      self.treeMapDivHeight = "0px";
      self.treeMapDivWidth = "0px";
      self.fourMapDivHeight = "0px";
      self.fourMapDivWidth = "0px";
      self.isEachMap = false;
      //将隐藏的
      var menuList = self.$refs.mainMap.ecchMapList_1.menuList;
      for (var i = 0; i < menuList.length; i++) {
        menuList[i].ismenu = true;
      }
    }
  }
};
</script>

<style>
body,
html {
  height: 100%;
  overflow: hidden;
}
#app {
  width: 100%;
  height: 100%;
}
.mainMap {
  top: 0px;
  float: left;
}
.towMapDiv {
  top: 0px;
  float: right;
}
.treeMapDIv {
  bottom: 0px;
  float: left;
}
.fourMapDiv {
  bottom: 0px;
  float: right;
}
.eachMapClose {
  position: absolute;
  z-index: 10000;
  top: 6px;
  right: 20px;
  height: 20px;
  width: 10px;
  font-size: 25px;
}
</style>
